package com.ruoyi.develop.goodsSale.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.develop.goodsSale.domain.GoodsSale;
import org.apache.ibatis.annotations.Param;

/**
 * 销售信息管理Mapper接口
 * @author qh
 * @date 2023-01-05
 */
public interface GoodsSaleMapper {
    /**
     * 查询销售信息管理
     * @param id 销售信息管理主键
     * @return 销售信息管理
     */
    public GoodsSale selectById(String id);

    /**
     * 查询销售信息管理列表
     * @param entity 销售信息管理
     * @return 销售信息管理集合
     */
    public List<GoodsSale> selectList(GoodsSale entity);

    public List<GoodsSale> listAndFour(GoodsSale entity);
    public List<GoodsSale> listProject(GoodsSale entity);

    public List<GoodsSale> listFinishDo(GoodsSale entity);

    public List<GoodsSale> listNoQishen(GoodsSale entity);

    public List<GoodsSale> listByProjectId(GoodsSale entity);
    public List<GoodsSale> selectListNotProject(GoodsSale entity);
    public List<GoodsSale> listBatch(String[] ids);
    public List<GoodsSale> listByProAndOrder(GoodsSale entity);

    public List<GoodsSale> selectByProjectId(String projectId);
    /**
     * 新增销售信息管理
     * @param entity 销售信息管理
     * @return 结果
     */
    public int insert(GoodsSale entity);

    /**
     * 修改销售信息管理
     * @param entity 销售信息管理
     * @return 结果
     */
    public int update(GoodsSale entity);

    /**
     * 删除销售信息管理
     * @param id 销售信息管理主键
     * @return 结果
     */
    public int deleteById(String id);

    public int deleteByIdThree(String id);

    public int deleteByIdFour(String id);
    /**
     * 批量删除销售信息管理
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteByIds(String[] ids);

    public int toAgain(String id);

    void updateFundBackByPrjId(GoodsSale entity);

    public GoodsSale selectByCodeAndProjectAndStatus(@Param("goodsCode")String goodsCode,@Param("projectId")String projectId,@Param("status")String status);

    public  List<GoodsSale> selectByModelAndProject(@Param("projectId")String projectId,@Param("goodModel")String goodModel);

    public int updateStatusByPro(@Param("projectId")String projectId,@Param("status")String status);

    public void updateByGongyiId(@Param("id")String id,@Param("gongyiId")String gongyiId);

    List<GoodsSale> listByOrderIds(GoodsSale entity);

    List<GoodsSale> listMergeByOrders(GoodsSale entity);

    List<GoodsSale> listNoMergeByOrders(GoodsSale entity);

    List<GoodsSale> selectListYifahuo(@Param("projectId")String projectId,@Param("status")String status);

    public void updateStatusById(@Param("id")String id,@Param("status")String status);

    void deleteByProjectId(String projectId);

    List<GoodsSale> selectListNotZero(GoodsSale entity);
    List<GoodsSale> listSendNotZero(GoodsSale entity);

    void replaceGoodsInfo(Map<String, Object> params);
}
